package com.glory.brepda.adapter;

import androidx.annotation.Nullable;

import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;
import com.glory.brepda.R;
import com.glory.brepda.base.MyApp;
import com.glory.brepda.entity.TempRecipeEntity;

import java.util.List;

public class RecipeListAdapter extends BaseQuickAdapter<TempRecipeEntity.TempRecipeInfoEntity, BaseViewHolder> {
    public RecipeListAdapter(@Nullable List<TempRecipeEntity.TempRecipeInfoEntity> data) {
        super(R.layout.adapter_temp_recipe,data);
    }
    @Override
    protected void convert(BaseViewHolder helper, TempRecipeEntity.TempRecipeInfoEntity item) {
        helper.setText(R.id.tvEqpID,item.getEquipmentId())
                .setText(R.id.tvRecipeName,item.getRecipeName())
                .setText(R.id.tvRecipeVersion,item.getVersion())
                .setText(R.id.tvRecipeType,item.getEquipmentType());
        helper.addOnClickListener(R.id.llMain);
    }
}
